#ifndef MYROBOT_H
#define MYROBOT_H

#include "WPILib.h"
#include <math.h>


//xbox Digital Controls
#define XBOX_A 			1
#define XBOX_B 			2
#define XBOX_X 			3
#define XBOX_Y 			4
#define XBOX_LBUMP 		5
#define XBOX_RBUMP 		6
#define XBOX_BACK 		7
#define XBOX_START 		8
#define XBOX_LSTICK 	9
#define XBOX_RSTICK 	10

//xbox Analog Controls
#define XBOX_LSTICK_X 	1
#define XBOX_LSTICK_Y 	2
#define XBOX_TRIGGERS	3	//-1 = right; +1 = left
#define XBOX_RSTICK_X 	4
#define XBOX_RSTICK_Y 	5

#define JOYSTICKDEADSPACE 	0.1

#define MINPRESSURE		60

//auton constants
#define FORWARD_ROTATIONS	8	//the number of rotations to go forward
#define LEAVE_ROTATIONS		4	//the number of rotations to go to the side

/** 
 * This file is included by all other files that communicate with the robot
 * and each other. All components (physically) on the robot need to be
 * declared in this file, and initialized by the constructor in MyRobot.cpp.
 * Any methods that are added later MUST be defined in this file, or other
 * files won't be able to call those methods. All methods (ideally) should
 * be in their own file, to make everything easier to find, read, debug, etc.,
 * but groups of methods performing a common task is also a good idea.
 */

/**
 * This is a demo program showing the use of the RobotBase class.
 * The SimpleRobot class is the base of a robot application that will automatically call your
 * Autonomous and OperatorControl methods at the right time as controlled by the switches on
 * the driver station or the field controls.
 */ 
class RobotDemo : public SimpleRobot
{
	//Anything on the robot physically that the program needs to
	//communicate with MUST be defined here before using!
	Victor motor5;
	Victor motor1;
	Victor motor4;
	Victor motor3;
	RobotDrive myRobot; 		// robot drive system

	Joystick leftStick;			// left joystick
	Joystick rightStick; 		// right joystick
	Joystick xbox;				// xbox controller
	
	
	//Motor Controllers
	Talon motor2;				// motor controller for arm to pick up
	Talon one;
	
	//Digital Inputs (limit switches)
	DigitalInput liftUp;
	DigitalInput liftDown; //possibly not necessary
	DigitalInput armDown;
	DigitalInput enableAuton;
	DigitalInput switchAuton;
	
	//RPM and PID control stuff
	//DigitalInput encoderLeft;
	//DigitalInput encoderRight;
	
	//Compressor compressor;	//runs the compressor automatically after calling start method
	//AnalogChannel pressureTransducer;	//analog pressure sensor
	
	Relay ledSpike;
	//Relay compRelay;
	
	/*
	Solenoid launchers;
	Solenoid latch;
	Solenoid shifters;
	Solenoid retractLaunchers;
	Solenoid retractLatch;
	Solenoid retractShifters;
	*/
	
	//Encoder encoder;
	
	DriverStationLCD *dsLCD;
	

public:
	RobotDemo();
	
	void Autonomous();		// *Autonomous-running code
	void Disabled();		// *Robot Disabled code
	void OperatorControl(); // *Code for the rest of the match
	void Test();			// *Method to test code (not for actual competition)
	void shutdownMotors();
	
	void UpdateSmartDashboard(bool testing = false);	// Method to display info to the Smart Dashboard
};

#endif
